using System;

namespace MechServer.Objects.Components.Gauges
{
	public sealed class CriticalComponent : MechServer.Objects.Components.Gauges.BaseGauge
	{
		public CriticalComponent(Guid parentObject,
			int currentEngineHits,
			int currentGyroHits,
			int currentSensorHits,
			int currentLifeSupportHits) : base()
		{
			ParentObject	= parentObject;
			
			CurrentEngineHits			= currentEngineHits;
			CurrentGyroHits			= currentGyroHits;
			CurrentSensorHits			= currentSensorHits;
			CurrentLifeSupportHits	= currentLifeSupportHits;

			BaseGaugeType = MechServer.Objects.Components.Gauges.Enums.Category.CriticalComponents;
		}
	
		private const int	_maxEngineHits			= 3;
		private const int _maxGyroHits			= 2;
		private const int _maxSensorHits			= 2;
		private const int _maxLifeSupportHits	= 1;
		
		private int _currentEngineHits;
		private int _currentGyroHits;
		private int _currentSensorHits;
		private int _currentLifeSupportHits;
		
		#region Properties
		
		public int MaxEngineHits
		{
			get
			{
				return _maxEngineHits;
			}
		}
		
		public int MaxGyroHits
		{
			get
			{
				return _maxGyroHits;
			}
		}
		
		public int MaxSensorHits
		{
			get
			{
				return _maxSensorHits;
			}
		}
		
		public int MaxLifeSupportHits
		{
			get
			{
				return _maxLifeSupportHits;
			}
		}
		
		public int CurrentEngineHits
		{
			get
			{
				return _currentEngineHits;
			}
			set
			{
				_currentEngineHits = value;
			}
		}
		
		public int CurrentGyroHits
		{
			get
			{
				return _currentGyroHits;
			}
			set
			{
				_currentGyroHits = value;
			}
		}
		
		public int CurrentSensorHits
		{
			get
			{
				return _currentSensorHits;
			}
			set
			{
				_currentSensorHits = value;
			}
		}
		
		public int CurrentLifeSupportHits
		{
			get
			{
				return _currentLifeSupportHits;
			}
			set
			{
				_currentLifeSupportHits = value;
			}
		}
		
		#endregion
	}
}